package com.gitee.yanfanvip.interfaces;

import java.util.Map;
import org.rocksdb.RocksDBException;

public interface DatabaseWrite {
	/**
	 * put数据
	 * @param keyspaces keyspaces
	 * @param key key
	 * @param value value
	 * @throws RocksDBException error
	 */
	public void put(String keyspaces, String key, byte[] value) throws RocksDBException;
	/**
	 * 批量插入数据
	 * @param keyspaces keyspaces
	 * @param datas datas as list
	 * @throws RocksDBException error
	 */
	public void putAll(String keyspaces, Map<String, byte[]> datas) throws RocksDBException;
	/**
	 * 删除数据
	 * @param keyspaces keyspaces
	 * @param key key
	 * @throws RocksDBException error
	 */
	public void remove(String keyspaces, String key)throws RocksDBException;
	/**
	 * 清空keyspaces
	 * @param keyspaces keyspaces
	 * @throws RocksDBException error
	 */
	public void clear(String keyspaces)throws RocksDBException;
}
